<template>
  <div class="gallary" @click="close1">
   <div class="gallary-img">
        <swiper :options="swiperOption">
         <swiper-slide v-for="(item, index) of list" :key="index"><img class="img" :src="item"/></swiper-slide>
         <div class="swiper-pagination"  slot="pagination"></div>
        </swiper>
   </div>
  </div>
</template>

<script>
export default {
  name: 'commongallary',
  props: {
    list: Array
  },
  methods: {
    close1 () {
      this.$emit('closerswiper', this.close)
    }
  },
  data () {
    return {
      close: false,
      swiperOption: {
        pagination: '.swiper-pagination',
        effect: 'flip',
        paginationType: 'fraction',
        observer: true,
        observeParents: true
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
  .gallary >>> .swiper-container
   overflow: inherit
  .gallary
   display: flex
   flex-direction: column
   justify-content: center
   z-index: 50
   position: fixed
   top: 0
   bottom: 0
   left: 0
   right: 0
   background: #111
   .gallary-img
    height: 0
    width: 100%
    padding-bottom: 31%
    background: #000
    .img
     width: 100%
   .swiper-pagination
    color: #ffffff
    bottom: -1rem
</style>
